/*
 * \brief  Thread facility
 * \author Christian Helmuth
 * \date   2008-10-20
 */

/*
 * Copyright (C) 2008-2009 Christian Helmuth
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

#include <base/thread.h>
#include <util/avl_tree.h>

#ifndef _THREAD_H_
#define _THREAD_H_

namespace Dde_kit {

	class Thread : Genode::Thread_base
	{
		private:

			const char *_name;
			unsigned    _id;
			void       *_stack;

			void       *_data;

			static unsigned _id_counter;

		public:

			explicit Thread(const char *name);
			~Thread();

			void start();


			/***************
			 ** Accessors **
			 ***************/

			const char *name() const    { return _name; }
			void name(const char *name) { _name = name; }
			unsigned id() const         { return _id; }
			void *data() const          { return _data; }
			void data(void *data)       { _data = data; }
	};

}

#endif /* _THREAD_H_ */
